Release 10.1A: OpenEdge Development:
Programming Interfaces
Changing the function of a key
You can globally change Progress key functions by modifying your environment. For more information on modifying your environment, see the chapter on colors and fonts in this book and the chapter on user interface environments in the OpenEdge Deployment: Managing 4GL Applications .
Although Progress has defined functions for several of the keys on your keyboard, you can redefine those keys to perform other functions within an application. In addition, you can assign functions to any of the other keyboard keys.
Suppose the user is accustomed to pressing F2 to get help information and F1 to signal that they are finished entering data. Although Progress usually treats F2 as
GOand F1 asHELP, you can switch the functions of those keys as demonstrated in the following procedure:
In this procedure, the
ONstatements redefine the function of F1, F2, and CTRL+X. Run this procedure, then press F1. You can see that F1 now performs theGOfunction, normally performed by F2. If you press CTRL+X, Progress rings the terminal bell. The new key definitions are in effect for the duration of the session, unless you redefine them. Also, on UNIX, any key label you use in anONstatement must have an entry in thePROTERMCAPfile for your terminal.When you use the
ONstatement, you use the name of the key whose function you are redefining, followed by the action you want to take when the user presses that key, as shown in Figure 4–4.Figure 4–4: Key function syntax and meaning
![]()
The
i-action.pprocedure uses three actions:GO,HELP, andBELL. There are many other actions you can use when redefining the function of a key. Table 4–5 lists these actions.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |